﻿<UserControl x:Class="ContactTracing.CaseView.Controls.AnalysisViewer"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:printing="clr-namespace:ContactTracing.CaseView.Controls.Printing"
             xmlns:p="clr-namespace:ContactTracing.CaseView.Properties"
             xmlns:Controls="clr-namespace:ContactTracing.CaseView.Controls"
             xmlns:Tabs="clr-namespace:ContactTracing.CaseView.Controls.Tabs"
             xmlns:sys="clr-namespace:System;assembly=mscorlib"
             xmlns:AnalysisControls="clr-namespace:ContactTracing.CaseView.Controls.Analysis"
             xmlns:own="clr-namespace:ContactTracing.CaseView"
             mc:Ignorable="d" 
             SnapsToDevicePixels="True"
             Loaded="UserControl_Loaded"
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Analysis/AnalysisStyleDictionary.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid x:Name="grdMain">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        
        <Border BorderThickness="1" BorderBrush="#333333" Background="{StaticResource WindowBackgroundBrush}" Grid.RowSpan="3"/>
        
        <!--<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
            <Button Style="{StaticResource BacklessButtonStyle}" Click="btnClose_Click" Margin="6">
            <Grid Grid.Column="6" x:Name="grdErrorIcon" Width="24" Height="24" Margin="4, 0, 1, 0" Visibility="Visible" VerticalAlignment="Bottom">
                <Rectangle x:Name="closeRectangle1" Style="{StaticResource closeRectangle}">
                    <Rectangle.ToolTip>
                        <ToolTip x:Name="toolTipClose">Closes the document viewer.</ToolTip>
                    </Rectangle.ToolTip>
                </Rectangle>
                <Path x:Name="pathX" Style="{StaticResource closeX}" IsHitTestVisible="False" Stretch="Fill" Width="6.878" Height="6.878" StrokeThickness="2" StrokeStartLineCap="Round" StrokeEndLineCap="Round" Data="M 200,0 L 0,200 M 0,0 L 200,200"/>
            </Grid>
            </Button>
        </StackPanel>-->

        <UniformGrid Grid.Row="2" Rows="1" Columns="5" Width="Auto" Height="32" Margin="1, 5, 1, 1" HorizontalAlignment="Stretch">
            <TextBlock Grid.Row="0" Grid.Column="0"></TextBlock>
            <TextBlock Grid.Row="0" Grid.Column="1"></TextBlock>
            <TextBlock Grid.Row="0" Grid.Column="2"></TextBlock>
            <TextBlock Grid.Row="0" Grid.Column="3"></TextBlock>
            <Button Grid.Row="0" Width="Auto" Grid.Column="4" Margin="5" x:Name="btnClose" Click="btnClose_Click" Content="{x:Static p:Resources.Close}" />
        </UniformGrid>

        <DocumentViewer Grid.Row="1" Margin="1">
        <FixedDocument x:Name="x2">
                <PageContent>
                    <FixedPage Margin="38, 30, 38, 30" IsHitTestVisible="False">
                        <StackPanel Width="730">
                            <TextBlock x:Name="tblockTitle" HorizontalAlignment="Center" Margin="10, 10, 10, 0" FontSize="22pt" FontWeight="Light" Text="{x:Static p:Resources.EpidemiologyReport}" />
                            <!--<TextBlock x:Name="tblockDate" HorizontalAlignment="Center" Margin="10, 0, 10, 10" FontSize="18pt" FontWeight="Light" Text="{Binding Source={x:Static sys:DateTime.Now}, StringFormat='{}{0:dd-MMM-yyyy HH:MM}'}" />-->

                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                                <TextBlock HorizontalAlignment="Center" Margin="10, 0, 10, 2" FontSize="16pt" FontWeight="Light" Text="{x:Static p:Resources.AnalysisDateCurrent}" />
                                <TextBlock x:Name="tblockDateCurrent" HorizontalAlignment="Center" Margin="10, 0, 10, 2" FontSize="16pt" FontWeight="Light" Text="{Binding Source={x:Static sys:DateTime.Now}, StringFormat='{}{0:dd-MMM-yyyy HH:mm}'}" />
                            </StackPanel>
                            
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                                <TextBlock HorizontalAlignment="Center" Margin="10, 0, 10, 2" FontSize="16pt" FontWeight="Light" Text="{x:Static p:Resources.AnalysisDateGenerated}" />
                                <TextBlock x:Name="tblockDate" HorizontalAlignment="Center" Margin="10, 0, 10, 2" FontSize="16pt" FontWeight="Light" Text="{Binding Source={x:Static sys:DateTime.Now}, StringFormat='{}{0:dd-MMM-yyyy HH:MM}'}" />
                            </StackPanel>

                            <AnalysisControls:AnalysisSectionHeader Margin="0, 10, 0, 10" Heading="{x:Static p:Resources.AnalysisSummaryHeading}" />
                            <AnalysisControls:EpiClassAllPatients Margin="0, 0, 0, 10" x:Name="analysisEpiClassAllPatients" />
                            <AnalysisControls:LabClassAllPatients Margin="0, 0, 0, 10" x:Name="labClassAllPatients" />
                            <AnalysisControls:PatientTestedInfo Margin="0, 0, 0, 10" x:Name="patientTestedInfo" />
                            <!--  <AnalysisControls:DailyStats Margin="0, 0, 0, 10" x:Name="dailyStats" />  -->  
                            <AnalysisControls:LastIsoInfo Margin="0, 0, 0, 10" x:Name="lastIsoInfo" />
                        </StackPanel>
                    </FixedPage>
                </PageContent>

                <PageContent>
                    <FixedPage Margin="38, 30, 38, 30" IsHitTestVisible="False">
                        <StackPanel Width="730">
                            <AnalysisControls:EpiCurveChartCPS ChartWidth="730"  HorizontalAlignment="Left" Margin="0, 0, 0, 10" x:Name="epiCurveSuspect" />
                            
                        </StackPanel>
                    </FixedPage>
                </PageContent>
            
                <PageContent>
                    <FixedPage Margin="38, 30, 38, 30" IsHitTestVisible="False">
                        <StackPanel Width="730">
                            <AnalysisControls:AnalysisSectionHeader Margin="0, 10, 0, 10" Heading="{x:Static p:Resources.AnalysisConfirmedProbableHeading}" />
                            <AnalysisControls:EpiCurveChartCP ChartWidth="730"  HorizontalAlignment="Left" Margin="0, 0, 0, 10" x:Name="epiCurve" />
                            <AnalysisControls:ConfirmedProbableTable  Margin="0, 0, 0, 10" x:Name="confirmedProbableTable" />
                            
                        </StackPanel>
                    </FixedPage>
                </PageContent>
                <PageContent>
                    <FixedPage Margin="38, 30, 38, 30" IsHitTestVisible="False">
                        <StackPanel Width="730">
                            <AnalysisControls:FinalOutcomeTable Margin="0, 0, 0, 10" x:Name="finalOutcomeTable" />
                            <AnalysisControls:SymptomsTable Margin="0, 0, 0, 10" x:Name="symptomsTable" />
                            
                            
                        </StackPanel>
                    </FixedPage>
                </PageContent>

                <PageContent>
                    <FixedPage Margin="38, 30, 38, 30" IsHitTestVisible="False">
                        <StackPanel Width="730">
                            <AnalysisControls:AgeGroupChartCP Margin="0, 0, 0, 10" HorizontalAlignment="Left"  x:Name="ageGroupChart" />
                            <AnalysisControls:AgeInfo Margin="0, 0, 0, 10" x:Name="ageTable" />

                        </StackPanel>
                    </FixedPage>
                </PageContent>
            
                <PageContent>
                    <FixedPage Margin="38, 30, 38, 30" IsHitTestVisible="False">
                        <StackPanel Width="730">
                            <AnalysisControls:ResidenceTable Margin="0, 0, 0, 10" x:Name="residenceTable" />
                        </StackPanel>
                    </FixedPage>
                </PageContent>
                <PageContent>
                    <FixedPage Margin="38, 30, 38, 30" IsHitTestVisible="False">
                        <StackPanel Width="730">
                            <AnalysisControls:OnsetLocationTable Margin="0, 0, 0, 10" x:Name="onsetLocationTable" />
                        </StackPanel>
                    </FixedPage>
                </PageContent>
                <PageContent>
                    <FixedPage Margin="38, 30, 38, 30" IsHitTestVisible="False">
                        <StackPanel Width="730">
                            <AnalysisControls:AnalysisSectionHeader Margin="0, 10, 0, 10" Heading="{x:Static p:Resources.AnalysisContactsHeading}" />
                            <AnalysisControls:FinalOutcomeContactsTable Margin="0, 0, 0, 10" x:Name="finalOutcomeContactsTable" />
                        </StackPanel>
                    </FixedPage>
            </PageContent>
        </FixedDocument>
        </DocumentViewer>
    </Grid>
</UserControl>
